package shangke;
import java.io.*;
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.FileInputStream;
import java.io.FileOutputStream;
public class day2 {
     public static void main(String[] args) throws IOException {
         //字节流写二进制文件
         //创建文件的
         //可以是任何路径
        /* File file = new File("D:\\\\8a0af5cec237ceba0aeb8d831d1f59bb.jpeg");
                          //创建输入流对象
         FileInputStream fileInputStream = new FileInputStream(file);
         //字节流读二进制文件
         DataInputStream dataInputStream = new DataInputStream(fileInputStream);
         //只能是文件夹不能是文件夹，必须是相对路径
         FileOutputStream fileOutputStream=new FileOutputStream("C:\\Intel\\8a0af5cec237ceba0aeb8d831d1f59bb.jpeg");
         DataOutputStream dataOutputStream=new DataOutputStream(fileOutputStream);
         int i = -1;
         while ((i = dataInputStream.read()) != -1) {
             char ch = (char) i;
             dataOutputStream.flush();
             dataOutputStream.write(i);
             //System.out.println(ch);
         }*/
     }
}
